<?php
require_once 'nns_db_vod_class.php';
require_once 'nns_db_vod_index_class.php';
require_once 'nns_db_vod_media_class.php';

$result = array ();

$vod_obj = new nns_db_vod_class();

$catogery["pub_category_detail_id"]='';
$catogery["pri_category_detail_id"]='2';
$catogery["pub_category_id"]='';
$catogery["pri_category_id"]='';


$tag[0]="1";
$tag[1]="1";
$tag[2]="1";
$tag[3]="0";
$tag[4]="0";
$tag[5]="0";
$tag[6]="0";

$vod_info["director"]="kj2";
$vod_info["actor"]="stone2";
$vod_info["show_time"]="2010-09-04";
$vod_info["view_len"]=10;
$vod_info["all_index"]=4;
$vod_info["new_index"]=1;
$vod_info["area"]="china";

$summary="西游记简介";
$remark="西游记备注";

$images["image0"]="../upfile/nns_4";
$images["image1"]="../upfile/nns_5";
$images["image2"]="../upfile/nns_6";
$images["image3"]="../upfile/nns_8";

//$result = $vod_obj->nns_db_vod_add('西游记',0,$catogery,0,'orgid',$tag,$vod_info,$summary,$remark);
//$result =$vod_obj->nns_db_vod_upload_images('2', $images);
//$result = $vod_obj->nns_db_vod_modify_images('2', $images);
//$result = $vod_obj->nns_db_vod_images_info('2');
//$temp=array(1,4,5);
//$result = $vod_obj->nns_db_vod_count('','',2,'','','','','','',NNS_VOD_DELETED_FALSE);
$result = $vod_obj->nns_db_vod_list('','','','','',$catogery,'','','','','',0,0,NNS_VOD_DELETED_FALSE);
//$result = $vod_obj->nns_db_vod_modify('00edbf5eed70a18c317caf9852acd497','点播目录9',0,$catogery,49,'orgid9',$tag,$vod_info,$summary,$remark);
//$result = $vod_obj->nns_db_vod_delete('00edbf5eed70a18c317caf9852acd497');
//$result = $vod_obj->nns_db_vod_retrieve('00edbf5eed70a18c317caf9852acd497');
//$result = $vod_obj->nns_db_vod_state('00edbf5eed70a18c317caf9852acd497', NNS_VOD_AND_MEDIA_STATE_ONLINE);
//$result = $vod_obj->nns_db_vod_check('d3a597a93b72fbea79bdd3a743424dfd', NNS_VOD_AND_MEDIA_CHECK_APPROVAL);
//$result = $vod_obj->nns_db_vod_info('00edbf5eed70a18c317caf9852acd497','nns_id,nns_name');


//$index_obj = new nns_db_vod_index_class();


//$result = $index_obj->nns_db_vod_index_count('','水浒传');
//$result = $index_obj->nns_db_vod_index_list('00edbf5eed70a18c317caf9852acd497', '', '', 0, 0);
//$result = $index_obj->nns_db_vod_index_info('00edbf5eed70a18c317caf9852acd497', '1');
//$result= $index_obj->nns_db_vod_index_modify('00edbf5eed70a18c317caf9852acd497',3,'水浒传6','','');


//$media_obj = new nns_db_vod_media_class ();

//$result = $media_obj->nns_db_vod_media_add('82c2654396626499f11545829ca83556', '兵临城下1集','兵临城下1集ipad源', 0, 'std','1028', 1 , '0,1,18,19', 'ftp://193.168.1.8', 108 , '简介8' );
//$temp_tag=array(1,4,5);
//$result = $media_obj->nns_db_vod_media_list(0,0,'',6,'',$temp_tag,'','','');
//$result = $media_obj->nns_db_vod_media_count('',6,'',$temp_tag,'','','');
//$result = $media_obj->nns_db_vod_media_state('889fe1e4cdc73622d14e747b0491f1e0', NNS_VOD_MEDIA_STATE_ONLINE);
//$result = $media_obj->nns_db_vod_media_check('b3289a800413634cef4b7317b9a16fb3', NNS_VOD_MEDIA_CHECK_APPROVAL);
//$result = $media_obj->nns_db_vod_media_delete('d8aad05b67dac08bc351dfbc6a62f7d4');
//$result = $media_obj->nns_db_vod_media_retrieve('d8aad05b67dac08bc351dfbc6a62f7d4');
//$result = $media_obj->nns_db_vod_media_modify('d8aad05b67dac08bc351dfbc6a62f7d4','水浒传第1集phone源xin',1,'ftp://198.46.34','9',0,'256');


/*try {
	$result = $media_obj->nns_db_curl ( 'http://127.0.0.1/nn_core/nn_pub_api/nn_pub_api.php', 'vod_content_add', '', '添加片源', 'ftp://192.168.1.1' );
	if (! empty ( $result )) {
		$xml = simplexml_load_string ( $result );
		$ret = ( string ) $xml->result ["ret"];
		$contentid = ( string ) $xml->content ["id"];
		
		print_r ( $xml );
		echo $ret . ":";
		echo $contentid . ":";
	
	}

} catch ( Exception $ex ) {
	throw $ex;
}*/

print_r ( $result );
